/* ========================================
   VARIABLES CSS SUPPLÉMENTAIRES
   Note: Les variables principales et les styles de base (*, body)
   sont définis dans variables.css qui est chargé avant ce fichier
   ======================================== */

:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --text-muted: #6c757d;
}

/* ========================================
   ÉTATS SPÉCIAUX DU BODY
   ======================================== */

/* Bloquer le scroll du body quand une modale est ouverte (desktop seulement) */
@media (min-width: 769px) {
    body.modal-open {
        overflow: hidden;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-violet), var(--primary-green));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-green), var(--primary-violet));
}

/* ========================================
   CONTENEUR DES FORMES FLOTTANTES
   ======================================== */

.content-wrapper {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: 100%;
}

/* ========================================
   FORMES FLOTTANTES EN ARRIÈRE-PLAN
   ======================================== */

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    --random-top: 10%;
    --random-left: 5%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-violet);
    top: var(--random-top);
    left: var(--random-left);
    --animation-duration: 28s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--primary-green);
    top: var(--random-top);
    left: var(--random-left);
    --animation-duration: 25s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--primary-red);
    top: var(--random-top);
    left: var(--random-left);
    --animation-duration: 30s;
}

.shape-4 {
    width: 280px;
    height: 280px;
    background: var(--primary-yellow);
    top: var(--random-top);
    left: var(--random-left);
    --animation-duration: 27s;
}

/* Les keyframes sont générées dynamiquement par floating-shapes.js */

/* ========================================
   NOTE: Header et Footer sont définis dans header.css et footer.css
   ======================================== */

/* ========================================
   CONTENEUR PRINCIPAL (toutes les pages sauf accueil)
   ======================================== */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
    position: relative;
}

/* ========================================
   EN-TÊTE DE PAGE (toutes les pages sauf accueil)
   ======================================== */

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-violet) 0%, var(--primary-green) 50%, var(--primary-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #6b7280;
    font-weight: 400;
}

/* ========================================
   SURLIGNAGE AVEC EFFET FLUO
   ======================================== */

.highlight {
    position: relative;
    display: inline;
    padding: 0.15em 0.3em;
    line-height: 1.5;
    color: #000 !important;
    font-weight: 700;
    border-radius: 12% 8% 10% 15% / 18% 12% 15% 10%;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: all 0.3s ease;
}

.highlight[data-tooltip] {
    cursor: help;
}

/* Variantes de couleurs avec opacité intégrée */
.highlight-violet {
    background-color: rgba(124, 18, 221, 0.5);
}

.highlight-green {
    background-color: rgba(58, 174, 80, 0.5);
}

.highlight-red {
    background-color: rgba(253, 0, 0, 0.5);
}

.highlight-blue {
    background-color: rgba(37, 99, 235, 0.5);
}

.highlight-yellow {
    background-color: rgba(251, 201, 0, 0.5);
}

.highlight:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* Variantes de couleurs pour le surlignage */
.highlight-violet {
    --highlight-color: var(--primary-violet);
}

.highlight-green {
    --highlight-color: var(--primary-green);
}

.highlight-red {
    --highlight-color: var(--primary-red);
}

.highlight-blue {
    --highlight-color: var(--primary-blue);
}

.highlight-yellow {
    --highlight-color: var(--primary-yellow);
}

/* ========================================
   TOOLTIP ÉLÉGANTE
   ======================================== */

.highlight[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(135deg, var(--primary-violet), var(--primary-green));
    color: white;
    padding: 0.75rem 1rem 1.1rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 400;
    max-width: 280px;
    width: max-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    line-height: 1.4;
    white-space: normal;
    text-align: justify;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
}

.highlight[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-15px);
}

/* ========================================
   LIENS ÉLÉGANTS
   ======================================== */


/* Style de base pour tous les liens sauf header, footer et cartes de programme */
a:not(header a):not(footer a):not(.thematique-bloc) {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    border-bottom: 2px solid var(--primary);
    transition: all 0.3s ease;
}

a:not(header a):not(footer a):not(.thematique-bloc):hover {
    border-bottom-color: var(--primary);
}

/* Icône de lien externe */
a:not(header a):not(footer a):not(.thematique-bloc)[href^="http"]::after,
a:not(header a):not(footer a):not(.thematique-bloc)[href^="https://"]::after,
a:not(header a):not(footer a):not(.thematique-bloc)[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-left: 0.25em;
    background-color: currentColor;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"/></svg>');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    vertical-align: baseline;
    transition: all 0.3s ease;
}

a:not(header a):not(footer a)[href^="http"]:hover::after,
a:not(header a):not(footer a)[href^="https://"]:hover::after,
a:not(header a):not(footer a)[target="_blank"]:hover::after {
    transform: translateY(-1px);
}

/* Variantes de couleurs pour les liens */
a.link-violet:not(header a):not(footer a) {
    color: var(--primary-violet);
    border-bottom-color: rgba(124, 18, 221, 0.3);
    background: rgba(255, 255, 255, 0.4);
    padding: 0.15em 0.3em;
    border-radius: 4px;
}

a.link-violet:not(header a):not(footer a):hover {
    border-bottom-color: var(--primary-violet);
}

a.link-green:not(header a):not(footer a) {
    color: var(--primary-green);
    border-bottom-color: rgba(58, 174, 80, 0.3);
    background: rgba(255, 255, 255, 0.4);
    padding: 0.15em 0.3em;
    border-radius: 4px;
}

a.link-green:not(header a):not(footer a):hover {
    border-bottom-color: var(--primary-green);
}

a.link-red:not(header a):not(footer a) {
    color: var(--primary-red);
    border-bottom-color: rgba(253, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.4);
    padding: 0.15em 0.3em;
    border-radius: 4px;
}

a.link-red:not(header a):not(footer a):hover {
    border-bottom-color: var(--primary-red);
}

a.link-blue:not(header a):not(footer a) {
    color: var(--primary-blue);
    border-bottom-color: rgba(37, 99, 235, 0.3);
    background: rgba(255, 255, 255, 0.4);
    padding: 0.15em 0.3em;
    border-radius: 4px;
}

a.link-blue:not(header a):not(footer a):hover {
    border-bottom-color: var(--primary-blue);
}

a.link-yellow:not(header a):not(footer a) {
    color: var(--primary-yellow-dark);
    border-bottom-color: rgba(217, 173, 0, 0.3);
    background: rgba(255, 255, 255, 0.4);
    padding: 0.15em 0.3em;
    border-radius: 4px;
}

a.link-yellow:not(header a):not(footer a):hover {
    border-bottom-color: var(--primary-yellow-dark);
}

