/* ============================================================
   CONTACT — présentation institutionnelle
   Typographie sobre, filets fins, aucun dégradé ni ombre décorative.
   Ordinateur : tout tient sur un écran. Téléphone : page empilée.
   ============================================================ */
.ct {
    --ct-ink:  var(--tx-1, #0f172a);
    --ct-text: var(--tx-2, #334155);
    --ct-soft: var(--tx-3, #64748b);
    --ct-line: var(--line-1, #e2e8f0);
    --ct-field: #cbd5e1;
    --ct-card: var(--surface-1, #fff);
    --ct-panel: #f8fafc;
    --ct-blue: #04326d;
    padding: clamp(7rem, 11vw, 8.5rem) 0 4rem;
}
:root[data-theme="dark"] .ct { --ct-panel: rgba(255,255,255,.035); --ct-field: rgba(255,255,255,.16); --ct-blue: #7aa6e6; }
.ct-wrap { padding: 0 clamp(16px, 5vw, 72px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }

/* ── Colonne de gauche ── */
.ct-title { margin: 0 0 .8rem; font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ct-ink); }
.ct-sub { margin: 0 0 2rem; max-width: 34rem; font-size: 1.02rem; line-height: 1.6; color: var(--ct-text); }


.ct-sub:has(+ .ct-langs) { margin-bottom: .35rem; }
.ct-langs { margin: 0 0 1.75rem; font-size: .86rem; line-height: 1.55; color: var(--ct-soft); }

/* ── Formulaire ── */
.ct-panel { padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--ct-panel); border: 1px solid var(--ct-line); border-radius: 4px; scroll-margin-top: 110px; }
.ct-panel h2 { margin: 0 0 .3rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ct-ink); }
.ct-panel-sub { margin: 0 0 1.5rem; font-size: .9rem; color: var(--ct-soft); }
.ct-form { margin: 0; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; margin-bottom: 1.4rem; }
.ct-f { display: grid; gap: .4rem; min-width: 0; }
.ct-f.is-wide { grid-column: 1 / -1; }
.ct-f > span { font-size: .82rem; font-weight: 600; color: var(--ct-ink); }
.ct-f input, .ct-f textarea {
    width: 100%; box-sizing: border-box; padding: .7rem .8rem; font: inherit; font-size: .95rem; color: var(--ct-ink);
    background: var(--ct-card); border: 1px solid var(--ct-field); border-radius: 3px; transition: border-color .15s;
}
.ct-f textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.ct-f input:focus, .ct-f textarea:focus { outline: 2px solid var(--ct-blue); outline-offset: -1px; border-color: var(--ct-blue); }
.ct-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.ct-actions small { font-size: .8rem; color: var(--ct-soft); }
.ct-btn { padding: .8rem 1.75rem; border: 0; border-radius: 3px; background: var(--ct-blue); color: #fff; font: inherit; font-size: .92rem; font-weight: 600; letter-spacing: .01em; cursor: pointer; transition: background .15s; }
.ct-btn:hover { background: #032654; }
:root[data-theme="dark"] .ct-btn { color: #0b1220; }
:root[data-theme="dark"] .ct-btn:hover { background: #9bbcec; }
.ct-alert { margin-bottom: 1.25rem; padding: .75rem 1rem; border-left: 3px solid #b91c1c; background: var(--ct-card); color: #b91c1c; font-size: .9rem; }
.ct-done { padding: 1.1rem 1.25rem; border-left: 3px solid #15803d; background: var(--ct-card); }
:root[data-theme="dark"] .ct-done { border-left-color: #4ade80; }
.ct-done strong { display: block; font-size: 1rem; color: var(--ct-ink); }
.ct-done p { margin: .3rem 0 0; font-size: .92rem; color: var(--ct-text); }

/* ── Icônes de contact ── */
.ct-icons { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: 1.1rem 0; margin-bottom: 1.5rem; border-top: 1px solid var(--ct-line); border-bottom: 1px solid var(--ct-line); }
.ct-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--ct-line); border-radius: 4px; color: var(--ct-blue); background: var(--ct-card); transition: background .15s, color .15s, border-color .15s; }
.ct-ico svg { width: 20px; height: 20px; }
.ct-ico:hover, .ct-ico:focus-visible { background: var(--ct-blue); border-color: var(--ct-blue); color: #fff; }
:root[data-theme="dark"] .ct-ico:hover, :root[data-theme="dark"] .ct-ico:focus-visible { color: #0b1220; }
.ct-hours { margin-left: auto; font-size: .86rem; color: var(--ct-soft); }

/* ── Bureau de Grenade : adresse + carte ── */
.ct-office { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: .75rem; margin-bottom: 1.25rem; align-items: stretch; }
.ct-office h2 { margin: 0 0 .35rem; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ct-ink); }
.ct-office p { margin: 0; white-space: nowrap; font-size: .92rem; line-height: 1.55; color: var(--ct-text); }
.ct-map { height: 220px; border: 1px solid var(--ct-line); border-radius: 4px; overflow: hidden; background: var(--ct-panel); }
.ct-map iframe { display: block; width: 100%; height: 100%; border: 0; }
:root[data-theme="dark"] .ct-map iframe { filter: grayscale(.2) brightness(.85); }

/* ── Tout sur un écran (ordinateur) ── */
@media (min-width: 1000px) and (min-height: 620px) {
    html:has(.ct) .footer { display: none; }
    html:has(.ct), html:has(.ct) body { height: 100%; overflow: hidden; }
    .ct { box-sizing: border-box; height: calc(100vh - var(--ann-h, 0px)); height: calc(100dvh - var(--ann-h, 0px)); padding: clamp(6rem, 14vh, 7.5rem) 0 clamp(1.25rem, 3.5vh, 2rem); display: flex; }
    .ct-wrap { flex: 1; min-height: 0; align-items: stretch; }
    .ct-side { min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; padding-top: clamp(1.1rem, 3vh, 2.25rem); }
    .ct-title { font-size: clamp(1.8rem, 4.4vh, 2.75rem); }
    .ct-sub { margin-bottom: clamp(1rem, 3vh, 2rem); }
    .ct-icons { margin-bottom: clamp(1rem, 3vh, 1.5rem); }
    .ct-office { flex: 1; min-height: 160px; max-height: 340px; }
    .ct-map { height: 100%; }
    .ct-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: clamp(1.1rem, 3vh, 2.25rem) clamp(1.25rem, 2.5vw, 2.25rem); }
    .ct-panel-sub { margin-bottom: clamp(.75rem, 2vh, 1.5rem); }
    .ct-panel .ct-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .ct-panel .ct-row { flex: 1; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); gap: clamp(.6rem, 1.6vh, 1rem) 1.1rem; margin-bottom: clamp(.8rem, 2vh, 1.4rem); }
    .ct-f input { padding: clamp(.5rem, 1.2vh, .7rem) .8rem; }
    .ct-f.is-wide { grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
    .ct-f textarea { min-height: 90px; height: 100%; resize: none; }
    html:has(.ct)::-webkit-scrollbar, html:has(.ct) body::-webkit-scrollbar { display: none; }
}

/* ── Téléphone / tablette ── */
@media (max-width: 999px) {
    /* Téléphone : titre, puis formulaire, puis coordonnées et carte */
    .ct-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .ct-side { display: contents; }
    .ct-title, .ct-sub, .ct-langs { order: -2; }
    .ct-langs { margin-bottom: 1.5rem; }
    .ct-panel { order: -1; margin-bottom: 2.5rem; }
}
@media (max-width: 560px) {
    .ct-office { grid-template-columns: 1fr; }
    .ct-office p { white-space: normal; }
    .ct-hours { margin-left: 0; width: 100%; }
    /* Formulaire compact : Nom et Email pleine largeur, Téléphone + Sujet côte à côte */
    .ct-panel { padding: 1.1rem 1rem 1.2rem; }
    .ct-panel h2 { font-size: 1.1rem; }
    .ct-panel h2 { margin-bottom: .8rem; }
    .ct-panel-sub { display: none; }
    .ct-row { grid-template-columns: 1fr 1fr; gap: .6rem .7rem; margin-bottom: .9rem; }
    .ct-row > .ct-f:nth-child(-n+2) { grid-column: 1 / -1; }
    .ct-f { gap: .25rem; }
    .ct-f > span { font-size: .78rem; }
    .ct-f input { padding: .55rem .7rem; }
    .ct-f textarea { height: 104px; min-height: 80px; padding: .55rem .7rem; }
    .ct-actions { gap: .5rem; }
    .ct-btn { width: 100%; padding: .7rem 1rem; }
    .ct-actions small { display: none; }
}
