/**
 * Refonte "S'installer en Espagne" — styles communs à toutes les pages.
 * Valeurs et sélecteurs portés tels quels depuis contenu-site/maquettes-html/.
 * Ne pas mélanger avec l'ancien design (voir CLAUDE.md à la racine du projet).
 */

:root {
    --navy: #14215b;
    --navy2: #1b2a6b;
    --red: #e3262d;
    --red-soft: #fdecec;
    --blue-soft: #eef2fb;
    --line: #e3e7f1;
    --text: #1f2a55;
    --muted: #4a5578;
    --green: #1f8a4c;
    --violet: #7b3fbf;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: #fff;
    min-width: 320px;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* header */
header {
    height: 92px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
header img.logo {
    height: 62px;
}
nav {
    display: flex;
    align-items: center;
    gap: 38px;
    font-weight: 500;
    font-size: 15px;
    color: var(--navy);
}
nav a {
    padding: 8px 0;
    position: relative;
}
nav a.active {
    color: var(--red);
}
nav a.active:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2.5px;
    background: var(--red);
    border-radius: 2px;
}
nav a:hover {
    color: var(--red);
}
.burger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.burger .lucide-x {
    display: none;
}
.mnav {
    display: none;
}

/* titles */
.red-dot {
    color: var(--red);
}
.eyebrow {
    color: var(--red);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .06em;
    text-align: center;
}
.eyebrow.lines:before,
.eyebrow.lines:after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 1.5px;
    background: var(--red);
    vertical-align: middle;
    margin: 0 12px;
}
h2.sec {
    font-size: 32px;
    font-weight: 600;
    color: var(--navy);
    text-align: center;
    margin-top: 6px;
}
.lead-c {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    margin-top: 8px;
}
.badge {
    display: inline-block;
    border: 1.5px solid #f3c3c5;
    color: var(--red);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    padding: 7px 16px;
    border-radius: 30px;
    background: #fff;
}

/* reassurance */
.reas {
    background: var(--blue-soft);
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 26px 10px;
}
.reas.reas-3 {
    grid-template-columns: repeat(3, 1fr);
}
.reas > div {
    display: flex;
    gap: 14px;
    padding: 0 22px;
    border-right: 1px solid #d6dcec;
    align-items: flex-start;
}
.reas > div:last-child {
    border-right: none;
}
.reas svg,
.coords svg,
.hero .ic2 svg {
    flex: none;
}
.reas .reas-label {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.25;
    margin-top: 0;
}
.reas p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 4px;
}

/* CTA */
.cta {
    background: var(--navy);
    border-radius: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 30px 44px;
}
.cta .circ {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.cta h3 {
    font-size: 25px;
    font-weight: 600;
}
.cta p {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 6px;
    opacity: .95;
}
.cta .mention {
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
    margin-top: 10px;
    opacity: .85;
}
.btn-red {
    background: var(--red);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 40px;
    padding: 16px 34px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    transition: background .15s;
}
.btn-red svg {
    flex: none;
}
.btn-red:hover,
.btn-red.is-hover {
    background: #c21b22;
}

/* coords */
.coords {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 24px 10px;
    background: #fff;
}
.coords > div {
    display: flex;
    gap: 18px;
    padding: 0 34px;
    border-right: 1px solid var(--line);
    align-items: flex-start;
}
.coords > div:last-child {
    border-right: none;
}
.coords .coords-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--navy);
    margin-top: 0;
}
.coords p {
    font-size: 15px;
    color: var(--navy);
    line-height: 1.55;
    margin-top: 4px;
}
.coords a {
    text-decoration: none;
}

/* footer */
footer {
    background: var(--navy);
    color: #fff;
    margin-top: 56px;
    padding: 40px 0 26px;
}
footer .cols {
    display: grid;
    grid-template-columns: 230px 1.4fr 1fr 1.1fr;
    gap: 36px;
    align-items: start;
}
footer .logo-plate {
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    display: inline-block;
}
footer .logo-plate img {
    height: 64px;
    display: block;
}
footer p {
    font-size: 13.5px;
    line-height: 1.65;
    opacity: .92;
}
footer .legal {
    border-top: 1px solid rgba(255, 255, 255, .18);
    margin-top: 28px;
    padding-top: 18px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    opacity: .9;
}
footer .legal a:hover {
    text-decoration: underline;
}

/* hero secondaire (photo + titre), réutilisé par plusieurs pages */
.hero2 {
    position: relative;
    min-height: 470px;
    overflow: hidden;
}
.hero2 .bg {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 62%;
    background-size: cover;
    background-position: center;
}
.hero2 .bg:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .6) 22%, rgba(255, 255, 255, 0) 45%);
}
.hero2 .wrap {
    position: relative;
    padding: 48px 0 44px;
}
.hero2 .txt {
    width: 560px;
}
.hero2 h1 {
    font-size: 46px;
    line-height: 1.12;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -.4px;
    margin-top: 18px;
}
.hero2 .txt > p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--navy);
    margin-top: 20px;
}
.ic2b {
    display: flex;
    gap: 36px;
    margin-top: 28px;
}
.ic2b > div {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.35;
}

/* boîtes / numéros / tableaux comparatifs (réutilisés par plusieurs pages) */
.sec {
    padding-top: 54px;
}
.boxw {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 32px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(20, 33, 91, .04);
}
.num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.num.red {
    background: var(--red);
}
.h3n {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 24px;
    font-weight: 600;
    color: var(--navy);
}
table.cmp {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}
table.cmp th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    font-size: 14.5px;
}
table.cmp th.r {
    background: var(--red);
}
table.cmp td {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
    color: var(--text);
}
table.cmp td.k {
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}
table.cmp td.k > div {
    display: flex;
    align-items: center;
    gap: 12px;
}
table.cmp td.k h3 {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    line-height: 1.5;
    margin: 0;
}
table.cmp td.es {
    background: #fff7f6;
}
/* Drapeaux SVG (remplacent les emoji, non rendus sous Windows).
   vertical-align calculé pour centrer le drapeau sur la hauteur des majuscules
   de Poppins (0,707em) : décalage = 0,707/2 - hauteur du drapeau/2. */
table.cmp th .cmp-flag {
    width: 1.3em;
    height: auto;
    vertical-align: -0.08em;
    margin-right: 6px;
}
table.cmp th .cmp-flag.after {
    margin-right: 0;
    margin-left: 6px;
}
.title-flag {
    width: 1.1em;
    height: auto;
    vertical-align: -0.013em;
}
.small {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
}
ul.dots {
    list-style: none;
}
ul.dots li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}
ul.dots li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
}

/* ---------- états interactifs ---------- */
.btn-o {
    transition: background .15s, color .15s;
}
.card {
    transition: box-shadow .2s, transform .2s;
}
.card:hover,
.card.is-hover {
    box-shadow: 0 14px 34px rgba(20, 33, 91, .14);
    transform: translateY(-3px);
}
.tile,
.opt {
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.tile.is-selected,
.opt.is-selected {
    border-color: var(--red);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--red) inset;
}
.input.is-focus,
.fld.is-focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(20, 33, 91, .12);
    color: var(--navy);
}
.fld.is-error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 38, 45, .12);
}
.err-msg {
    color: var(--red);
    font-size: 12px;
    margin: -6px 0 10px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn-red:focus-visible {
    outline: 3px solid #2456c9;
    outline-offset: 3px;
}

/* ---------- formulaires : rendu Symfony (tuiles radio, messages, honeypot) ---------- */

/* Les tuiles .tile / .opt encapsulent un input radio masqué visuellement mais accessible. */
.tile input[type="radio"],
.opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.tile:has(input[type="radio"]:checked),
.opt:has(input[type="radio"]:checked) {
    border-color: var(--red);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--red) inset;
}
.tile:has(input[type="radio"]:focus-visible),
.opt:has(input[type="radio"]:focus-visible) {
    outline: 3px solid #2456c9;
    outline-offset: 3px;
}

/* Icônes internes des champs (remplacent d'anciens styles inline). */
.input .input-ic {
    width: 18px;
    height: 18px;
}
.opt .opt-ic {
    width: 38px;
    height: 38px;
    flex: none;
}
.lbl-hint {
    font-size: 11.5px;
    color: var(--muted);
}

/* Messages de retour (flash) au-dessus des formulaires. */
.form-flash {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 14px;
}
.form-flash-success {
    background: #eaf7ef;
    color: #1f6b3b;
    border: 1px solid #b8e3c6;
}
.form-flash-error {
    background: #fdecec;
    color: #a51b20;
    border: 1px solid #f3c2c4;
}

/* Erreurs de validation par champ. */
.field-errors {
    list-style: none;
    margin: -4px 0 12px;
    padding: 0;
    color: var(--red);
    font-size: 12.5px;
}
.field-errors li {
    margin-top: 2px;
}

/* Champ leurre anti-spam (honeypot) : hors écran et hors flux. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Récapitulatif d'erreurs accessible (affiché en cas de soumission invalide). */
.form-errors-summary {
    border: 1px solid #f3c2c4;
    background: var(--red-soft);
    border-left: 4px solid var(--red);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #a51b20;
}
.form-errors-summary:focus {
    outline: 3px solid rgba(227, 38, 45, .35);
    outline-offset: 2px;
}
.form-errors-summary-title {
    font-weight: 600;
    margin-bottom: 8px;
}
.form-errors-summary ul {
    margin: 0;
    padding-left: 18px;
}
.form-errors-summary li {
    margin-top: 2px;
}
.form-errors-summary a {
    color: #a51b20;
    text-decoration: underline;
}

/* ---------- responsive commun ---------- */

/* ---- classes extraites du HTML inline ---- */

/* base.html.twig : conteneur du bandeau coordonnées (style="margin-top:26px"). */
.wrap-coords {
    margin-top: 26px;
}

/* _cta_final.html.twig : bloc englobant le CTA (style="margin-top:26px"). */
.band-cta {
    margin-top: 26px;
}

/* _cta_final.html.twig : icône dans le cercle blanc (style="width:70px;height:70px;flex:none;"). */
.cta-icon {
    width: 70px;
    height: 70px;
    flex: none;
}

/* _cta_final.html.twig : bloc texte central du CTA (style="flex:1"). */
.cta-body {
    flex: 1;
}

/* _cta_final.html.twig : colonne bouton + mention (style="text-align:center;max-width:330px"). */
.cta-action {
    text-align: center;
    max-width: 330px;
}

/* _bandeau_coordonnees.html.twig : icônes des 3 coordonnées (style="width:52px;height:52px;flex:none;"). */
.coords-icon {
    width: 52px;
    height: 52px;
    flex: none;
}

/* _reassurance.html.twig : icônes des items de réassurance (style="width:54px;height:54px;flex:none;"). */
.reas-icon {
    width: 54px;
    height: 54px;
    flex: none;
}
