/* ==========================================================================
   Lys Hosting — système de design
   Identité : premium, technologique, québécoise, chaleureuse.
   Clair par défaut, hiérarchie typographique forte, animations discrètes.
   ========================================================================== */

:root {
    /* Couleurs */
    --encre: #16283a;          /* texte principal */
    --encre-douce: #46586c;    /* texte secondaire */
    --bleu: #14507e;           /* primaire (bleu Lys) */
    --bleu-fonce: #0d3a5e;
    --bleu-pale: #e8f0f7;
    --or: #a97e2c;             /* accent doré, usage parcimonieux */
    --vert: #1c7c54;           /* confirmations */
    --fond: #fdfcfa;           /* fond chaud */
    --fond-2: #f5f2ec;         /* sections alternées, sable chaud */
    --carte: #ffffff;
    --ligne: #e6e1d7;
    --erreur: #b3261e;

    /* Typographie */
    --titres: "Montserrat", -apple-system, "Segoe UI", sans-serif;
    --texte: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Rythme */
    --rayon: 12px;
    --ombre: 0 1px 2px rgba(22, 40, 58, 0.06), 0 8px 24px rgba(22, 40, 58, 0.07);
    --ombre-forte: 0 2px 4px rgba(22, 40, 58, 0.08), 0 16px 40px rgba(22, 40, 58, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--texte);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--encre);
    background: var(--fond);
    -webkit-font-smoothing: antialiased;
}

/* --- Typographie ------------------------------------------------------- */

h1, h2, h3, h4 {
    font-family: var(--titres);
    line-height: 1.15;
    color: var(--encre);
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; }

a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bleu-fonce); }

.avant-titre {
    font-family: var(--titres);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--or);
    margin-bottom: 0.75em;
}

.section-intro { color: var(--encre-douce); max-width: 46em; }

/* --- Structure ---------------------------------------------------------- */

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

section { padding-block: clamp(56px, 8vw, 96px); }
.section-alt { background: var(--fond-2); }

.grille-2 { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grille-3 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grille-4 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* --- Accessibilité ------------------------------------------------------ */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--bleu-fonce);
    color: #fff;
    padding: 10px 18px;
    z-index: 200;
    border-radius: 0 0 var(--rayon) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Boutons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    font-family: var(--titres);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    padding: 13px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primaire { background: var(--bleu); color: #fff; }
.btn-primaire:hover { background: var(--bleu-fonce); color: #fff; }
.btn-secondaire { background: var(--bleu-pale); color: var(--bleu-fonce); }
.btn-secondaire:hover { background: #d9e7f2; color: var(--bleu-fonce); }
.btn-ghost { background: transparent; color: var(--bleu-fonce); border-color: var(--ligne); }
.btn-ghost:hover { border-color: var(--bleu); color: var(--bleu-fonce); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.cta-groupe { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- En-tête / navigation ------------------------------------------------ */

.entete {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ligne);
}
.entete-int {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}
.logo img { display: block; height: 38px; width: auto; }

/* > ul uniquement : sinon .nav ul gagne sur .nav-sous { display:none } et les deux menus restent ouverts. */
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a, .nav-toggle {
    font-family: var(--titres);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--encre);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav a:hover, .nav-toggle:hover { background: var(--fond-2); color: var(--encre); }
/* Page courante : reste bien visible dans le menu (ne « disparaît » pas). */
.nav a[aria-current="page"],
.nav-actif > a,
.nav-actif > .nav-toggle {
    color: var(--bleu-fonce);
    background: var(--bleu-pale);
    font-weight: 700;
}

.nav-groupe { position: relative; }
.nav .nav-sous {
    list-style: none;
    margin: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--carte);
    border: 1px solid var(--ligne);
    border-radius: var(--rayon);
    box-shadow: var(--ombre-forte);
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 40;
}
.nav .nav-groupe.ouvert .nav-sous { display: flex; }
.nav .nav-sous a { display: block; width: 100%; }

.nav-actions { display: flex; gap: 10px; margin-left: 12px; align-items: center; }
.nav-lang {
    font-family: var(--titres);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--encre-douce);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--ligne);
    line-height: 1;
}
.nav-lang:hover {
    color: var(--bleu-fonce);
    border-color: var(--bleu);
    background: transparent;
}

.nav-burger { display: none; background: none; border: none; padding: 10px; cursor: pointer; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--encre); margin: 5px 0; border-radius: 2px; }

/* Seuil relevé : avec Tourisme + Téléphonie, le menu desktop débordait entre ~960 et 1180 px. */
@media (max-width: 1180px) {
    .nav-burger { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--carte);
        border-bottom: 1px solid var(--ligne);
        box-shadow: var(--ombre-forte);
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }
    .nav.ouvert { display: block; }
    .nav > ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; }
    .nav .nav-sous {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }
    .nav .nav-groupe.ouvert .nav-sous { display: flex; }
    .nav-actions { flex-direction: column; margin: 12px 0 0; }
}

/* --- Fil d'Ariane -------------------------------------------------------- */

.ariane { padding-top: 24px; font-size: 0.85rem; }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; color: var(--encre-douce); }
.ariane li + li::before { content: "›"; margin-right: 6px; color: var(--ligne); }
.ariane a { color: var(--encre-douce); }

/* --- Hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(56px, 9vw, 110px); }
.hero h1 { max-width: 17em; }
.hero .hero-texte { font-size: 1.15rem; color: var(--encre-douce); max-width: 38em; margin-bottom: 1.6em; }

.reassurance {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
    color: var(--encre-douce);
}
.reassurance li { display: flex; align-items: center; gap: 8px; }
.reassurance li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vert);
    flex-shrink: 0;
}

/* --- Cartes --------------------------------------------------------------- */

.carte {
    background: var(--carte);
    border: 1px solid var(--ligne);
    border-radius: var(--rayon);
    padding: 28px;
    box-shadow: var(--ombre);
}
.carte h3 { margin-top: 0; }
.carte p:last-child { margin-bottom: 0; }
.carte-lien { text-decoration: none; color: inherit; display: block; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.carte-lien:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); color: inherit; }
.carte-lien .carte-appel { color: var(--bleu); font-weight: 700; font-family: var(--titres); font-size: 0.9rem; }

/* --- Forfaits --------------------------------------------------------------- */

.carte-plan {
    background: var(--carte);
    border: 1px solid var(--ligne);
    border-radius: var(--rayon);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ombre);
    position: relative;
}
.carte-plan-vedette { border-color: var(--bleu); border-width: 2px; box-shadow: var(--ombre-forte); }
.plan-badge {
    position: absolute;
    top: -13px;
    left: 24px;
    background: var(--bleu);
    color: #fff;
    font-family: var(--titres);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 999px;
    margin: 0;
}
.plan-pour-qui { color: var(--encre-douce); font-size: 0.95rem; min-height: 3em; }
.plan-prix { font-family: var(--titres); font-size: 2.2rem; font-weight: 800; margin: 0.2em 0 0; }
.plan-prix span { font-size: 1rem; font-weight: 600; color: var(--encre-douce); }
.plan-renouvellement { font-size: 0.82rem; color: var(--vert); font-weight: 600; margin-bottom: 1em; }
.plan-features { list-style: none; padding: 0; margin: 0 0 24px; flex-grow: 1; }
.plan-features li {
    padding: 7px 0 7px 26px;
    position: relative;
    font-size: 0.93rem;
    border-bottom: 1px solid var(--fond-2);
}
.plan-features li::before { content: "✓"; position: absolute; left: 2px; color: var(--vert); font-weight: 700; }

/* --- Tableau comparatif ------------------------------------------------------ */

.tableau-defile { overflow-x: auto; }
table.comparatif { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.93rem; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); }
.comparatif caption { text-align: left; font-size: 0.85rem; color: var(--encre-douce); padding: 8px 4px; caption-side: bottom; }
.comparatif th, .comparatif td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.comparatif thead th { font-family: var(--titres); background: var(--bleu-fonce); color: #fff; }
.comparatif thead th:first-child { border-radius: var(--rayon) 0 0 0; }
.comparatif thead th:last-child { border-radius: 0 var(--rayon) 0 0; }
.comparatif tbody th { font-weight: 600; color: var(--encre-douce); width: 220px; }
.comparatif .oui { color: var(--vert); font-weight: 700; }
.comparatif .non { color: var(--encre-douce); }

/* --- FAQ (details/summary) ---------------------------------------------------- */

.faq-liste { max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--ligne); }
.faq-item summary {
    font-family: var(--titres);
    font-weight: 700;
    font-size: 1.02rem;
    padding: 18px 36px 18px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--bleu);
    font-weight: 400;
}
.faq-item[open] summary::after { content: "–"; }
.faq-reponse { padding: 0 0 20px; color: var(--encre-douce); max-width: 60em; }
.faq-reponse p:last-child { margin-bottom: 0; }

/* --- Étapes (migration) --------------------------------------------------------- */

.etapes { list-style: none; counter-reset: etape; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.etapes li {
    counter-increment: etape;
    background: var(--carte);
    border: 1px solid var(--ligne);
    border-radius: var(--rayon);
    padding: 28px;
    box-shadow: var(--ombre);
}
.etapes li::before {
    content: counter(etape);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bleu);
    color: #fff;
    font-family: var(--titres);
    font-weight: 800;
    margin-bottom: 14px;
}
.etapes p { color: var(--encre-douce); font-size: 0.95rem; margin: 0; }

/* --- Section fondateur ------------------------------------------------------------ */

.fondateur { display: grid; gap: 40px; grid-template-columns: 280px 1fr; align-items: center; }
.fondateur-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--rayon);
    object-fit: cover;
    object-position: center 20%;
    background: var(--fond-2);
    border: 1px solid var(--ligne);
}
.fondateur blockquote { margin: 0 0 1em; font-size: 1.15rem; font-style: italic; color: var(--encre); border-left: 3px solid var(--or); padding-left: 20px; }
@media (max-width: 720px) { .fondateur { grid-template-columns: 1fr; } .fondateur-photo { max-width: 260px; } }

/* --- Bande CTA finale --------------------------------------------------------------- */

.bande-cta { background: var(--bleu-fonce); color: #fff; text-align: left; }
.bande-cta h2 { color: #fff; max-width: 22em; }
.bande-cta p { color: #c8d6e2; max-width: 40em; margin-bottom: 1.6em; }
.bande-cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.bande-cta .btn-ghost:hover { border-color: #fff; color: #fff; }
.bande-cta .btn-primaire { background: #fff; color: var(--bleu-fonce); }
.bande-cta .btn-primaire:hover { background: var(--bleu-pale); color: var(--bleu-fonce); }

/* --- Formulaires ------------------------------------------------------------------- */

.formulaire { max-width: 620px; }
.champ { margin-bottom: 18px; }
.champ label { display: block; font-family: var(--titres); font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.champ input, .champ select, .champ textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--encre);
    background: var(--carte);
    border: 1px solid var(--ligne);
    border-radius: 8px;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--bleu); outline: 2px solid var(--bleu-pale); }
.champ-note { font-size: 0.82rem; color: var(--encre-douce); margin-top: 4px; }
.champ-pot-de-miel { position: absolute; left: -9999px; }
.form-message { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; display: none; }
.form-message.ok { display: block; background: #e6f4ec; color: var(--vert); border: 1px solid #bfe3cf; }
.form-message.erreur { display: block; background: #fbeae9; color: var(--erreur); border: 1px solid #f0c7c4; }

/* --- Pied de page --------------------------------------------------------------------- */

.pied { background: var(--fond-2); border-top: 1px solid var(--ligne); padding-top: 56px; font-size: 0.92rem; }
.pied-grille { display: grid; gap: 36px; grid-template-columns: 1.4fr repeat(4, 1fr); padding-bottom: 40px; }
.pied-marque img { height: 34px; width: auto; margin-bottom: 12px; }
.pied-marque p { color: var(--encre-douce); max-width: 26em; }
.pied-coordonnees a { display: inline-block; margin-top: 2px; }
.pied-col h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--encre-douce); margin-bottom: 14px; }
.pied-col ul { list-style: none; margin: 0; padding: 0; }
.pied-col li { margin-bottom: 9px; }
.pied-col a { color: var(--encre); text-decoration: none; }
.pied-col a:hover { color: var(--bleu); text-decoration: underline; }
.pied-bas { border-top: 1px solid var(--ligne); padding-block: 22px 90px; color: var(--encre-douce); font-size: 0.83rem; }
.pied-bas p { margin-bottom: 8px; }
.pied-note { max-width: 62em; }
@media (max-width: 960px) { .pied-grille { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pied-grille { grid-template-columns: 1fr; } }

/* --- CTA mobile persistant ---------------------------------------------------------------- */

.cta-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(253, 252, 250, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--ligne);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    gap: 10px;
}
.cta-mobile .btn { flex: 1; padding: 12px 10px; font-size: 0.9rem; }
@media (max-width: 720px) {
    .cta-mobile { display: flex; }
    .bande-cta, .pied-bas { padding-bottom: 100px; }
}

/* --- Pages prose (légal, etc.) ---------------------------------------------------------------- */

.page-prose { padding-bottom: 72px; }
.page-prose article { max-width: 760px; }
.page-entete { margin: 24px 0 36px; }
.page-sous-titre { font-size: 1.1rem; color: var(--encre-douce); }
.page-prose h2 { margin-top: 1.8em; }
.page-prose ul li { margin-bottom: 0.4em; }

/* --- Divers ------------------------------------------------------------------------------------- */

.badge-loi25 {
    display: inline-block;
    background: var(--bleu-pale);
    color: var(--bleu-fonce);
    font-family: var(--titres);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.liste-verte { list-style: none; padding: 0; }
.liste-verte li { padding: 6px 0 6px 28px; position: relative; }
.liste-verte li::before { content: "✓"; position: absolute; left: 2px; color: var(--vert); font-weight: 700; }
.note-technique {
    background: var(--fond-2);
    border-left: 3px solid var(--or);
    border-radius: 0 var(--rayon) var(--rayon) 0;
    padding: 16px 20px;
    font-size: 0.92rem;
    color: var(--encre-douce);
}
.centre { text-align: center; }
.centre .section-intro, .centre .cta-groupe { margin-inline: auto; }
.centre .cta-groupe { justify-content: center; }

/* Apparition douce au défilement (désactivée si prefers-reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
    .apparait { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
    .apparait.visible { opacity: 1; transform: none; }
}
