/* === RESET SIMPLE === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --sa-red:#d00;
    --sa-red-hover:#b00;
    --sa-border:#ddd;
    --sa-muted:#666;
    --sa-link:#0056b3;
    --sa-bg:#fafafa;
    --sa-card-bg:#fff;
    --sa-shadow: 0 2px 10px rgba(0,0,0,.06);
}

body {
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333;
    padding: 0;
    margin: 0;
}

/* === CONTAINER PRINCIPAL === */
main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem;
}

/* === HEADER === */
header {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--sa-border);
    padding: 1rem 2rem;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-title a {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--sa-red); /* Rouge Suisse */
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a.active { 
    text-decoration: underline; /* ou border-bottom, couleur, etc. */ 
}

/* === ACTIONS DU HEADER (unifié) ============================================ */
header .lang-switcher { 
    margin-top: 0; 
    display: inline-flex; 
    align-items: center; 
}

/* Pilule générique */
.pill{
    background: var(--sa-red);
    color:#fff;
    border-radius:999px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    text-decoration:none;
    line-height:1.2;
    box-shadow:0 2px 8px rgba(0,0,0,.10);
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
    white-space:nowrap;
    height:38px;
    padding:0 .9rem;
    border: none;
}

/* Bouton Suggestion */
.cta-suggest.pill:hover{
    background: var(--sa-red-hover);
    box-shadow:0 4px 12px rgba(0,0,0,.14);
    text-decoration:none;
    transform:translateY(-1px);
}
.cta-suggest.pill.is-active{
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.85), 0 2px 8px rgba(0,0,0,.12);
}
.cta-suggest .cta-dot{
    display:inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    font-weight: 800;
    text-align: center;
}

/* Select langue façon pilule */
.pill-select{
    background: var(--sa-red);
    color:#fff;
    border-radius:999px;
    font-weight:700;
    height:38px;
    padding:0 .9rem;
    display:inline-flex;
    align-items:center;
    line-height:1.2;
    box-shadow:0 2px 8px rgba(0,0,0,.10);
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
    cursor:pointer;
    border: none;
    -webkit-appearance:none; 
    appearance:none;
    background-image:none;
}
.pill-select:hover{ 
    background: var(--sa-red-hover); 
    transform:translateY(-1px); 
}
.pill-select, .pill-select option{ color:#fff; }

/* === FORMULAIRES === */
form {
    margin-top: 1.5rem;
}

input[type="text"],
select,
textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

button[type="submit"] {
    padding: 0.6rem 1.2rem;
    background-color: var(--sa-red);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: var(--sa-red-hover);
}

/* Ligne de formulaire */
.form-row{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}
.form-label{
    min-width:260px;
    font-weight:600;
}
.form-label .required{ color: var(--sa-red); }
.form-field{ flex:1; }

.form-row .form-field input[type="text"],
.form-row .form-field select,
.form-row .form-field textarea{
    max-width:100%;
    margin-top:0;
    margin-bottom:0;
}

/* === LISTE DES RÉSULTATS === */
.results-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.result {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--sa-border);
    border-radius: 10px;
    padding: 14px;
    background-color: var(--sa-card-bg);
    box-shadow: var(--sa-shadow);
}

.result .thumb{
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
}

.result .thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.result .content{
    flex: 1 1 auto;
    min-width: 0;
}

.result h2{
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 6px;
    font-weight: 700;
    color: #222;
}

.result h2 small{
    font-weight: 500;
    color: var(--sa-muted);
    font-size: .9rem;
}

.result p{
    margin: 6px 0;
}

.result p strong{
    font-weight: 600;
}

.result a{
    color: var(--sa-link);
    text-decoration: none;
    word-break: break-word;
}
.result a:hover{ text-decoration: underline; }

.result .meta{
    margin-top: 4px;
    font-size: .9rem;
    color: var(--sa-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.result .meta img{
    height: 18px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
}

.result + .result{
    margin-top: 1rem;
}

/* === FOOTER === */
footer {
    background: #f5f5f5;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 4rem;
    border-top: 1px solid var(--sa-border);
}

.footer-links {
    margin-bottom: 0.5rem;
}

.footer-links a {
    margin: 0 0.5rem;
    text-decoration: none;
    color: #444;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 680px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-title a{
        font-size: 1.5rem;
    }
    .result .thumb{
        flex-basis: 84px;
        width: 84px;
        height: 84px;
    }
    .form-row{ flex-direction:column; align-items:stretch; }
    .form-label{ min-width:0; }
    .pill, .pill-select { height:36px; padding:0 .75rem; }
    .cta-suggest .cta-dot{ width:18px; height:18px; line-height:18px; }
}

/* Unification du style des champs de formulaire */
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px; /* Arrondi uniforme */
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Pour afficher le logo à gauche dans le select */
.canton-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.canton-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

