/*
 * Hugo Mandon — Tous mes réseaux
 * © 2026 Hugo Mandon — Tous droits réservés
 * Version 2.0.0 — Mars 2026
 * hugomandon.netlify.app
 */

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-teal); border-radius: var(--border-radius); transition: all 0.3s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ===================== TYPO ===================== */
@font-face { font-family: 'Jost'; src: url('typo/Jost-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('typo/Jost-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('typo/Jost-ExtraLight.ttf') format('truetype'); font-weight: 200; font-style: normal; font-display: swap; }

/* ===================== VARIABLES ===================== */
:root {
    --bg-primary: #001A1A;
    --accent-cyan: #00FFFF;
    --text-white: #FFFFFF;
    --border-teal: #005E5E;

    --title-size: clamp(1.875rem, 2.148vw, 82.5px);
    --subtitle-size: clamp(1.125rem, 1.172vw, 45px);
    --paragraph-size: clamp(0.9rem, 0.977vw, 37.5px);
    --small-text-size: clamp(0.675rem, 0.300vw, 27px);

    --border-effect: clamp(2px, 1vw, 60px);
    --border-width: clamp(0.1px, 0.0006944vw, 10px);
    --border-radius: clamp(5px, 0.4vw, 50px);
    --line-length: clamp(10px, 10vw, 1000px);

    --padding-weight: clamp(20px, 2vw, 100px);
    --padding-height: clamp(10px, 2vh, 100px);
    --padding-large-weight: clamp(30px, 4vw, 100px);
    --padding-large-height: clamp(10px, 4vh, 100px);

    --bouton-height: calc(
        1.2 * var(--subtitle-size)
        + 2 * var(--padding-height)
        + 2 * var(--border-width)
    );

    --section-content-max-width: 1000px;
}

/* ===================== RESET & BASE ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Jost', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-white);
    font-weight: 200;
    line-height: 1.2;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
body.loaded { opacity: 1; }
button { font-family: 'Jost', sans-serif; cursor: pointer; }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
img { max-width: 100%; display: block; }

/* ===================== SECTIONS PLEIN ÉCRAN ===================== */
.full-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: var(--padding-large-height) var(--padding-large-weight);
    padding-bottom: calc(var(--padding-large-height) * 3); /* espace pour la flèche */
}

/* Arrière-plans par section */
.hero-section      { background-image: url('images/bg_hero.png'); }
.hugomandon-section { background-image: url('images/bg_hugomandon.png'); }
.hugovideo-section  { background-image: url('images/bg_hugovideo.png'); }
.hugocards-section  { background-image: url('images/bg_hugocards.png'); }
.comptes-section    { background-image: url('images/bg_comptesfermes.png'); }

/* ===================== CONTENU DE SECTION ===================== */
.section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--section-content-max-width);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--padding-height);
}

/* ===================== TITRES ===================== */
.main-title-index {
    font-size: var(--title-size);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0em;
    color: var(--accent-cyan);
    text-align: center;
    margin-bottom: 0;
}

.main-title {
    font-size: var(--title-size);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0em;
    margin-bottom: var(--padding-height);
    color: var(--accent-cyan);
    text-align: center;
}


.title-line-index {
    width: var(--line-length);
    height: var(--border-width);
    margin: 0 auto;
    background-color: var(--accent-cyan);
    margin-bottom: var(--padding-height);
}

.title-line {
    width: var(--line-length);
    height: var(--border-width);
    margin: 0 auto;
    background-color: var(--accent-cyan);
    margin-bottom: var(--padding-large-height);
}


.subtitle {
    font-size: var(--subtitle-size);
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 0em;
    text-align: center;
    color: var(--text-white);
}

/* ===================== LIGNES / ROWS ===================== */
.row {
    display: flex;
    align-items: center;
    width: 100%;
}

.row-center {
    justify-content: center;
}

.gap-normal {
    gap: var(--padding-height);
}

/* ===================== AVATAR (PHOTO ET ICONES) ===================== */
.avatar-wrapper {
    flex-shrink: 0;
}

.avatar-img {
    height: var(--bouton-height);
    max-width: var(--bouton-height);
    object-fit: contain;
}

.avatar-img-hugo {
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* ===================== LOGOS ===================== */
.logo-img {
    max-height: var(--bouton-height);
    width: auto;
    object-fit: contain;
    margin-bottom: var(--padding-height);
    margin-top: var(--padding-large-height);
}

/* ===================== ICÔNES CARRÉES (comptes fermés) ===================== */
.icon-square {
    flex-shrink: 0;
    width: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    height: auto;
    align-self: stretch;
    max-width: var(--bouton-height);
}

/* ===================== BOUTONS ===================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--padding-height) / 2);
    background-color: var(--bg-primary);
    font-size: var(--subtitle-size);
    font-weight: 200;
    color: var(--accent-cyan);
    padding: var(--padding-height) var(--padding-weight);
    border: var(--border-width) solid var(--border-teal);
    border-radius: var(--border-radius);
    letter-spacing: 0em;
    box-shadow: 0 0 var(--border-effect) var(--border-teal);
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.button:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-primary);
    border: var(--border-width) solid var(--accent-cyan);
    box-shadow: 0 0 var(--border-effect) var(--accent-cyan);
}

/* Bouton pleine largeur de la ligne */
.full-width-btn {
    flex: 1;
}

/* Icône dans le bouton — taille commune */
.btn-icon {
    flex-shrink: 0;
    transition: filter 0s;
}

/* Simple Icons (balise <img>) */
img.btn-icon.si-icon {
    width: calc(var(--subtitle-size)*0.9);
    height: calc(var(--subtitle-size)*0.9);
    object-fit: contain;
}

.button:hover img.btn-icon.si-icon {
    /* Transformer le blanc en couleur sombre pour contraster sur fond cyan */
    filter: brightness(0) saturate(100%) invert(7%) sepia(36%) saturate(3456%) hue-rotate(169deg) brightness(95%) contrast(105%);
}

/* Material Symbols (balise <span>) */
span.btn-icon.material-symbols-outlined {
    font-size: var(--subtitle-size);
    line-height: 1.2;
    color: inherit; 
}

/* ===================== FLÈCHE DE DÉFILEMENT ===================== */
.scroll-indicator {
    position: absolute;
    bottom: var(--padding-large-height);
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: clamp(30px, 1.563vw, 60px);
    height: clamp(30px, 1.563vw, 60px);
    background-color: transparent;
    border-left: var(--border-width) solid var(--accent-cyan);
    border-bottom: var(--border-width) solid var(--accent-cyan);
    transform: rotate(-45deg);
    /* Assurer une épaisseur minimale visible */
    border-left-width: max(var(--border-width), 1px);
    border-bottom-width: max(var(--border-width), 1px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

/* ===================== FOOTER ===================== */
#footer {
    background-color: var(--bg-primary);
    border-top: var(--border-width) solid var(--accent-cyan);
    padding: var(--padding-large-height) 0;
}

.footer-container {
    max-width: var(--section-content-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--padding-height);
    text-align: center;
}

.footer-line {
    display: contents;
}

.footer-link {
    font-size: var(--paragraph-size);
    font-weight: 200;
    color: var(--text-white);
    transition: color 0.3s ease;
    position: relative;
}

.footer-link .link-text {
    position: relative;
}

.footer-link .link-text::after {
    content: '';
    position: absolute;
    bottom: clamp(-1px, -0.5vw, -50px);
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: max(var(--border-width), 1px);
    background-color: var(--accent-cyan);
    transition: transform 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-cyan);
}

.footer-link:hover .link-text::after {
    transform: translateX(-50%) scaleX(1);
}

.footer-copyright {
    font-size: var(--paragraph-size);
    font-weight: 200;
    color: var(--text-white);
}

/* ===================== PAGES ===================== */
.pages-section {
    margin: calc(var(--padding-large-weight)) auto;
}

.container {
    margin: 0 0;
    padding: 0 var(--padding-large-weight);
}

.pages-content {
    max-width: 1000px;
    margin: 0 auto;
}

.pages-subtitle {
    font-size: var(--subtitle-size);
    font-weight: 200;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-top: var(--padding-large-height);
    margin-bottom: var(--padding-height);
    letter-spacing: 0;
}

.pages-paragraph {
    margin-top: var(--padding-large-weight);
    margin-bottom: var(--padding-large-weight);
}

.pages-paragraph p {
    font-size: var(--paragraph-size);
    font-weight: 200;
    margin-bottom: calc(var(--padding-height)/2);
    text-align: justify;
}

.pages-paragraph p:last-child {
    margin-bottom: 0;
}

.highlight {
    font-weight: 400;
}

/* ===================== FORMULAIRE ===================== */
.hidden { display: none; }
.contact-form { max-width: 1000px; margin: 0 auto; margin-top: var(--padding-height); display: flex; flex-direction: column; gap: var(--padding-height); }
.form-group { display: flex; flex-direction: column; gap: calc(var(--padding-height) / 2); }
.form-group input, .form-group textarea { width: 100%; padding: var(--padding-height); font-family: 'Jost', sans-serif; font-size: var(--paragraph-size); font-weight: 200; color: var(--text-white); background-color: var(--bg-primary); border: var(--border-width) solid var(--border-teal); border-radius: var(--border-radius); box-shadow: 0 0 var(--border-effect) var(--border-teal); transition: all 0.3s ease; outline: none; }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 var(--border-effect) var(--accent-cyan); }
.form-group textarea { resize: none; min-height: 200px; }
.form-group input:-webkit-autofill, .form-group input:-webkit-autofill:hover, .form-group input:-webkit-autofill:focus, .form-group input:-webkit-autofill:active, .form-group textarea:-webkit-autofill, .form-group textarea:-webkit-autofill:hover, .form-group textarea:-webkit-autofill:focus, .form-group textarea:-webkit-autofill:active { -webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset !important; -webkit-text-fill-color: var(--text-white) !important; border: var(--border-width) solid var(--border-teal) !important; box-shadow: 0 0 var(--border-effect) var(--border-teal) !important; transition: background-color 5000s ease-in-out 0s; }
.submit-button-wrapper { margin-top: var(--padding-weight); margin-bottom: var(--padding-large-weight); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.success-message { text-align: center; padding: var(--padding-height); background-color: rgba(0, 255, 255, 0.1); border: var(--border-width) solid var(--accent-cyan); border-radius: var(--border-radius); box-shadow: 0 0 var(--border-effect) var(--accent-cyan); margin-top: var(--padding-height); animation: fadeInSlideUp 0.3s ease; }
.success-message p { font-size: var(--paragraph-size); font-weight: 200; color: var(--accent-cyan); margin: 0; }
@keyframes fadeInSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.success-message.fade-out { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }

.form-group label {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--padding-height) / 1.5);
    font-size: var(--paragraph-size);
    font-weight: 200;
    color: var(--text-white);
    text-transform: none;
    letter-spacing: 0em;
    cursor: pointer;
    line-height: 1.4;
}

/* Label des champs (hors checkbox) */
.form-group > label:not(:has(input[type="checkbox"])) {
    text-transform: uppercase;
    font-size: var(--paragraph-size);
}

/* Masquer la case native */
.form-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: calc(var(--paragraph-size) * 1.1);
    height: calc(var(--paragraph-size) * 1.1);
    margin-top: calc((1.4em - var(--paragraph-size) * 1.1) / 2);
    background-color: var(--bg-primary);
    border: var(--border-width) solid var(--border-teal);
    border-radius: 0;
    box-shadow: 0 0 var(--border-effect) var(--border-teal);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.form-group input[type="checkbox"]:checked {
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 var(--border-effect) var(--accent-cyan);
}

.form-group input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 35%;
    height: 60%;
    border-right: max(var(--border-width), 1.5px) solid var(--bg-primary);
    border-bottom: max(var(--border-width), 1.5px) solid var(--bg-primary);
    margin: 10% auto 0;
    transform: rotate(45deg);
}

.button-wrapper { text-align: center; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 800px) {

    /* Chaque ligne de boutons passe en colonne */
    .row {
        flex-direction: column;
        align-items: stretch;
    }

    /* Les lignes avec un avatar restent en ligne horizontale */
    .row:has(.avatar-wrapper) {
        flex-direction: row;
        align-items: center;
    }

    /* Les boutons prennent toute la largeur */
    .button,
    .full-width-btn {
        width: 100%;
        flex: none;
        white-space: normal;
        text-align: center;
    }

    /* Les boutons dans une row avec avatar reprennent flex:1 pour remplir l'espace restant */
    .row:has(.avatar-wrapper) .button,
    .row:has(.avatar-wrapper) .full-width-btn {
        flex: 1;
        width: auto;
    }

    /* Bouton mail garde 100% largeur */
    #hugomandon .row:has(.avatar-wrapper) .button {
        width: 100% !important;
        flex: none !important;
    }

    /* LOGO HUGO EN HAUT */
    #hugomandon .row:has(.avatar-wrapper) {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* FORMATIONS SUR UNE LIGNE */
    #hugovideo .row:nth-of-type(4) {
        flex-direction: row !important;
    }

    #hugovideo .row:nth-of-type(4) .button {
        width: 50%;
        flex: 1;
    }

    /* REPLAYS + ANALYSE SUR UNE LIGNE */
    #hugovideo .row:nth-of-type(6) {
        flex-direction: row !important;
    }

    #hugovideo .row:nth-of-type(6) .button {
        width: 50%;
        flex: 1;
    }

    /* Désactiver toutes les animations au survol et au clic sur mobile */
    .button:hover,
    .button:active,
    .button:focus {
        background-color: var(--bg-primary);
        color: var(--accent-cyan);
        border-color: var(--border-teal);
        box-shadow: 0 0 var(--border-effect) var(--border-teal);
    }

    .button:hover img.btn-icon.si-icon,
    .button:active img.btn-icon.si-icon {
        filter: none;
    }

    .footer-link:hover,
    .footer-link:active {
        color: var(--text-white);
    }

    .footer-link:hover .link-text::after,
    .footer-link:active .link-text::after {
        transform: translateX(-50%) scaleX(0);
    }

    a {
        transition: none;
    }

    /* Désactiver le background-attachment: fixed sur mobile (bug Safari/iOS) */
    .full-section {
        background-attachment: scroll;
    }

    /* Footer en colonne sur mobile */
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ===================== ANIMATION FADE IN ===================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }